CREATE PROCEDURE [dbo].[GetMaxUBRN]
AS

Select ISNULL(MAX(UBRN), 1000) from Appointment
	
RETURN @@RowCount